drawNineSlice

fun DrawContext.drawNineSlice(id: Identifier, x: Int, y: Int, width: Int, height: Int)

Extension function to replicate the nine-slice functionality drawGuiTexture from 1.20.2+.

in 1.20.2+ this is a compat method; maintained as-is to avoid needing to alter mod code elsewhere.

Author

fzzyhmstrs

Since

0.2.0

Parameters

id

Identifier - The sprite identifier (1.20.2+ style) for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width

Int - the width of the drawn texture

height

Int - the height of the drawn texture


fun DrawContext.drawNineSlice(id: Identifier, x: Int, y: Int, width: Int, height: Int, color: Int)

Extension function to replicate the nine-slice functionality drawGuiTexture from 1.20.2+.

in 1.20.2+ this is a compat method; maintained as-is to avoid needing to alter mod code elsewhere.

Author

fzzyhmstrs

Since

0.6.1

Parameters

id

Identifier - The sprite identifier (1.20.2+ style) for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width

Int - the width of the drawn texture

height

Int - the height of the drawn texture

color

Int - the ARGB packed color int


fun DrawContext.drawNineSlice(id: Identifier, x: Int, y: Int, width: Int, height: Int, alpha: Float)

Extension function to replicate the nine-slice functionality drawGuiTexture from 1.20.2+.

in 1.20.2+ this is a compat method; maintained as-is to avoid needing to alter mod code elsewhere.

Author

fzzyhmstrs

Since

0.6.1

Parameters

id

Identifier - The sprite identifier (1.20.2+ style) for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width

Int - the width of the drawn texture

height

Int - the height of the drawn texture

alpha

Float - the texture transparency